<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">我的收入</h4>
</div>
<div class="wrapper-md">
    <div class="panel panel-body" ng-controller="propertyCtrl">
        <!--店铺资产信息-->
        <div class="m-b-md" >
            <div class="bg-light panel-body">
                <div class="pull-left m-r">
                    <img src="img/default.png" ng-src="{{app.image.shop}}{{shop.shopHeadImgUrl}}" err-src="img/error.png" class="thumb-lg">
                </div>
                <div class="pull-left m-t-sm">
                    <div>
                        <p class="inline text-muted ">店铺名称：</p>
                        <span class="inline">{{shop.name}}</span>
                    </div>
                    <div>
                        <p class="inline text-muted">营业状态：</p>
                        <span class="inline" ng-if="shop.status==0">营业中</span>
                        <span class="inline" ng-if="shop.status==1">休息中</span>
                        <span class="inline" ng-if="shop.status==2">停止营业</span>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>

            <div class="b-a panel-body">
                <div class="col-sm-2 b-r">
                    <div>
                        <span class="block m-b-sm">
                            累计收入
                        </span>
                        <div>
                            <h2 class="inline m-n" ng-if="shop.accumulativeMoney!=null">￥{{shop.accumulativeMoney | number:2}}</h2>
                            <h2 class="inline m-n" ng-if="shop.accumulativeMoney==null">￥0.00</h2>
                            <a href="" class="pull-right m-t-md h6 text-info" ui-sref="app.propertyHistory">收支明细</a>
                        </div>
                    </div>
                </div>
                <div class="col-sm-2 b-r">
                    <div>
                        <span class="block m-b-sm">
                            当月收入
                        </span>
                        <div>
                            <h2 class="inline m-n" ng-if="shop.monthIncomeMoney!=null">￥{{shop.monthIncomeMoney | number:2}}</h2>
                            <h2 class="inline m-n" ng-if="shop.monthIncomeMoney==null">￥0.00</h2>
                        </div>
                    </div>
                </div>
                <div class="col-sm-2 b-r">
                    <div>
                        <span class="block m-b-sm">推荐奖励</span>
                        <div>
                            <h2 class="inline m-n" ng-if="shop.monthIncomeMoney!=null">￥{{shop.commendMoney | number:2}}</h2>
                            <h2 class="inline m-n" ng-if="shop.monthIncomeMoney==null">￥0.00</h2>
                        </div>
                    </div>
                </div>
                <div class="col-sm-2 b-r">
                    <div>
                        <span class="block m-b-sm">待结算</span>
                        <div>
                            <h2 class="inline m-n" ng-if="shop.waitSumMoney!=null">￥{{shop.waitSumMoney | number:2}}</h2>
                            <h2 class="inline m-n" ng-if="shop.waitSumMoney==null">￥0.00</h2>
                            <a href="" class="pull-right m-t-md h6 text-info" ui-sref="app.settleAccounts({state:1})">待结算记录</a>
                        </div>
                    </div>
                </div>
                <div class="col-sm-2">
                    <div>
                        <span class="block m-b-sm">可用余额</span>
                        <div>
                            <h2 class="inline m-n" ng-if="shop.withdrawalMoney!=null">￥{{shop.withdrawalMoney | number:2}}</h2>
                            <h2 class="inline m-n" ng-if="shop.withdrawalMoney==null">￥0.00</h2>
                            <div class="pull-right h6">
                                <button class="btn btn-sm btn-info pull-right" ng-click="getShopBankcardList()">提现</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div>
            <div>
                <span class="b-l-danger b-l b-l-2x block padder">提现记录</span>
            </div>
            <div class="table-responsive m-t-md">
                <table class="table table-striped b-t b-light">
                    <thead>
                        <tr>
                            <th>申请人</th>
                            <th>操作编号</th>
                            <th>提现金额</th>
                            <th>到账银行</th>
                            <th>操作时间</th>
                            <th>状态</th>
                            <th>备注</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in list">
                            <td>
                                姓名：{{item.proposer}}<br>
                                联系方式：{{item.mobilePhone}}
                            </td>
                            <td>{{item.withdrawalNumber}}</td>
                            <td>{{item.withdrawalMoney | number:2}} 元</td>
                            <td>
                                <span ng-if="item.bankStatus==1">银行：{{item.bank}}({{item.bankType}})<br></span>
                                <span ng-if="item.bankStatus==0">公司：{{item.companyName}}<br></span>
                                银行卡号：{{item.bankCard}}<br>
                                开户行：{{item.bankAddress}}
                            </td>
                            <td>
                                <span ng-if="item.applyTime != null">申请时间：{{item.applyTime}}<br></span>
                                <span ng-if="item.disposeTime != null">开始处理时间：{{item.disposeTime}}<br></span>
                                <span ng-if="item.completeTime != null">处理结束时间：{{item.completeTime}}</span>
                            </td>
                            <td>
                                <span class="label bg-info" ng-if='item.status==0'>申请中</span>
                                <span class="label bg-warning" ng-if='item.status==1'>银行处理中</span>
                                <span class="label bg-success" ng-if='item.status==2'>提现成功</span>
                                <span class="label bg-danger" ng-if='item.status==3'>提现失败</span>
                                <i class="m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="失败原因：{{item.failReason}}" popover-trigger="mouseenter" ng-if="item.status==3"></i>
                            </td>
                            <td>
                                {{item.remark}}
                            </td>
                            <td>
                                <button class="btn btn-sm btn-success" ng-click="withdrawalConfirm(item.id)" ng-if="item.status==1">确认转账</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div ng-if="list.length<=0 && !app.loading" class="padder-v text-center">
                    <span class="h6">~未搜索到任何数据~</span>
                </div>
                <div>
                    <circle-loading ng-if="app.loading"></circle-loading>
                </div>
            </div>
            <footer class="panel-footer">
                <div class="row">
                    <div class="col-sm-offset-4 col-sm-4 text-center">
                        <small class="text-muted inline m-t-sm m-b-sm">显示第 {{startRow}} 至 {{endRow}} 项结果，共 {{totalItems}} 项</small>
                    </div>
                    <div class="col-sm-4 text-right text-center-xs">
                        <pagination boundary-links="true" total-items="totalItems" ng-model="currentPage"
                                    ng-change="pageChanged()" max-size="{{maxPageRow}}" class="pagination-sm m-t-none m-b"
                                    previous-text="上一页" next-text="下一页"
                                    first-text="首页" last-text="尾页"></pagination>
                    </div>
                </div>
            </footer>
        </div>
    </div>
</div>
